package com.cctc.service.impl;


import com.cctc.dao.PurchaseDao;
import com.cctc.dao.PurchaseDetailDao;
import com.cctc.service.PurchaseService;

import java.util.List;


public class PurchaseServiceImpl implements PurchaseService {

    private PurchaseDao purchaseDao;
    private PurchaseDetailDao purchaseDetailDao;
    private PurchaseServiceImpl(PurchaseDao purchaseDao, PurchaseDetailDao purchaseDetailDao) {
        this.purchaseDao = purchaseDao;
        this.purchaseDetailDao = purchaseDetailDao;
    }
    public static PurchaseService createInstance(PurchaseDao purchaseDao, PurchaseDetailDao purchaseDetailDao) {
        return new PurchaseServiceImpl(purchaseDao, purchaseDetailDao);
    }


    @Override
    public void receivedByIds(List<Long> purchaseIds) {
        /**
         * 由采购人员领取采购单
         * 1. 采购人员
         * 发送待领取的采购单 ID 列表
         * 2. 采购系统
         * 2.1 更新采购单的状态为已领取
         * 2.2 更新所有（状态为未采购的）采购需求（项）的状态为正在采购
         */
    }

}